package com.lgx.mall.business.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;
import com.lgx.right.entity.Organization;

/**
 * 短信兑换购物信息
 * @author acer
 *
 */
@Entity
@Table(name = "TM_EXCHANGESMS")
public class ExchangeSMS implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2589775518614415086L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.SHOPPINGINFO_ID_GENERATOR)
	@TableGenerator(
			name = IdGenerator.SHOPPINGINFO_ID_GENERATOR,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.SHOPPINGINFO_ID_GENERATOR,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	/**
	 * 短信内容
	 */
	private String content;
	
	/**
	 * 是否已交易
	 */
	private Boolean isExchange;
	
	/**
	 * 交易商家
	 */
	@ManyToOne
	@JoinColumn(name="merchant_id")
	private Organization merchant;
	
	/**
	 * 下单时间
	 */
	private Date orderTime;
	
	/**
	 * 交易时间
	 */
	private Date tradeTime; 
	
	/**
	 * 用户手机
	 */
	private String mobile;
	
	/**
	 * 交易编号
	 */
	private String tradeNode;
	
	/**
	 * 订单ID
	 */
	@Column(name="order_id")
	private long orderId;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Boolean getIsExchange() {
		return isExchange;
	}

	public void setIsExchange(Boolean isExchange) {
		this.isExchange = isExchange;
	}

	public Organization getMerchant() {
		return merchant;
	}

	public void setMerchant(Organization merchant) {
		this.merchant = merchant;
	}

	public Date getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}

	public Date getTradeTime() {
		return tradeTime;
	}

	public void setTradeTime(Date tradeTime) {
		this.tradeTime = tradeTime;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getTradeNode() {
		return tradeNode;
	}

	public void setTradeNode(String tradeNode) {
		this.tradeNode = tradeNode;
	}

	public long getOrderId() {
		return orderId;
	}

	public void setOrderId(long orderId) {
		this.orderId = orderId;
	}
}
